home *** CD-ROM | disk | FTP | other *** search
- Path: trojan.neta.com (Internet Access)!not-for-mail
- From: blair@trojan.neta.com (Blair P Houghton)
- Newsgroups: comp.lang.c
- Subject: Re: sqrt() cheesy question
- Date: 23 Feb 1996 10:45:40 -0700
- Organization: Internet Access, Chandler AZ.
- Message-ID: <4gkug4$ss9@trojan.neta.com>
- References: <4gjmmt$lt7@hopi.dtcc.edu>
- NNTP-Posting-Host: trojan.neta.com
-
- In article <4gjmmt$lt7@hopi.dtcc.edu>,
- Rob Wiltbank <w4582@hopi.dtcc.edu> wrote:
- >Howdy all. I'm in a bind.
-
- No, you're in a sqrt(3m); bind(2) is dealt with in another group.
-
- >I'm in a beggining C course at school, and I'm about 2 weeks ahead of the
- >class so I'm doing projects that the class hasn't even considered going
- >over yet. I'm still on the very newbie side of it all.
-
- >Could someone post the function definition of the sqrt() function found
- >in math.h?
-
- In most cases, it just calls the FSQRT instruction for
- the processor, which either involves the FPU (if one
- is attached) or calls some microcode.
-
- What you want isn't the function definition, it's the algorithm
- for doing square roots in an arithmetic way.
-
- I'd suggest going to the library and looking up either
- _Seminumerical Algorithms_ by Donald Knuth (if you stay in
- SW engineering you will end up owning this book and the
- other two volumes in the series) or _Numerical Methods in
- C_ by I. Forget. The latter one also comes in Fortran and
- Pascal versions, either of which will explain the algorithm.
-
- --Blair
- "...knit one, perl two.
- And in Baseball today..."
-